import os
try:
	os.mkdir("music")
except FileExistsError:
	pass
print("888666444's Music Webside - Control Shell")
while True:
    cmd = input(">>>")
    if cmd == "exit" or cmd == "quit":
        break
    elif cmd == "help":
        print("exit, update/upd ,newartist/mkartist ,stoppage ,restartpage ,newmusic/mkmusic ,help ,getmusiclist/getml ,updhtml ,delmusic/rmmusic ,delartist/rmartist")
    elif cmd == "update" or cmd=="upd":
        os.system("python ./updhtml.py")
        os.system("python ./updall.py")
    elif cmd=="newartist" or cmd=="mkartist":
        os.system("python ./newArtist.py")
        os.system("python ./updateArtistList.py")#update index
    elif cmd=="newmusic" or cmd=="mkmusic":
        os.system("python ./newMusic.py")
    elif cmd=="stoppage":
        os.system("python ./stopPage.py")
    elif cmd=="restartpage":
        os.system("python ./restartPage.py")
    elif cmd=="getmusiclist" or cmd=="getml":
        os.system("python ./getMusicList.py")
    elif cmd=="updhtml":
        os.system("python ./updhtml.py")
        os.system("python ./updall.py")#update all website
    elif cmd=="delartist" or cmd=="rmartist":
        os.system("python ./rmArtist.py")
        os.system("python ./updateArtistList.py")#update index
    elif cmd=="delmusic" or cmd=="rmmusic":
        os.system("python ./rmMusic.py")
    elif cmd=="\n" or cmd=="":
        pass
    else:
        print("command not found")
